import request from '../utils/request';
import { api } from '../utils/config';

export async function login (data) {
  const {username, password} = data;
  return request( `${api}/login`, {
    method:'post',
    data
  })
}

export async function getToken (params) {
  return request(`${api}/token`, {
    method: 'post'
  })
}

export async function logout(){
  return request(`${api}/logout`,{
    method: 'get'
  })
}
